﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/Site.Master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="Ingebet.Web.Register" Theme="Thème1" %>

<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Créer un nouveau compte
    </h2>
    <p>
        Utilisez le formulaire ci-dessous pour créer un nouveau compte.
    </p>
    <span class="failureNotification">
        <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
    </span>
    <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
        ValidationGroup="RegisterUserValidationGroup" />
    <div class="accountInfo">
        <legend>Informations de compte</legend>
        <p>
            <asp:Label ID="lblCivilite" runat="server" AssociatedControlID="ddlCivilite">Civilite :</asp:Label>
            <asp:DropDownList ID="ddlCivilite" runat="server" CssClass="textEntry">
                <asp:ListItem Selected="True" Value="Mr"> Mr </asp:ListItem>
                <asp:ListItem Value="Mme"> Mme </asp:ListItem>
            </asp:DropDownList>
        </p>
        <p>
            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Nom d'utilisateur :</asp:Label>
            <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                CssClass="failureNotification" ErrorMessage="Un nom d'utilisateur est requis."
                ToolTip="Un nom d'utilisateur est requis." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
        </p>
        <p>
            <asp:Label ID="lblPrenom" runat="server" AssociatedControlID="UserPrenom">Prenom d'utilisateur :</asp:Label>
            <asp:TextBox ID="UserPrenom" runat="server" CssClass="textEntry"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="UserName"
                CssClass="failureNotification" ErrorMessage="Un nom d'utilisateur est requis."
                ToolTip="Un nom d'utilisateur est requis." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
        </p>
        <p>
            <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">Adresse de messagerie :</asp:Label>
            <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
            <asp:CustomValidator ID="EmailReq" runat="server" ControlToValidate="Email" ErrorMessage="Email deja existant"
                ValidateEmptyText="true" OnServerValidate="ValiderEmail" Display="dynamic" ValidationGroup="RegisterUserValidationGroup" />
            <%--            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                CssClass="failureNotification" ErrorMessage="Une adresse de messagerie est requise."
                ToolTip="Une adresse de messagerie est requise." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>--%>
        </p>
        <p>
            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Mot de passe :</asp:Label>
            <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                CssClass="failureNotification" ErrorMessage="Un mot de passe est requis." ToolTip="Un mot de passe est requis."
                ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
        </p>
        <p>
            <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirmer le mot de passe :</asp:Label>
            <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification"
                Display="Dynamic" ErrorMessage="La confirmation du mot de passe est requise."
                ID="ConfirmPasswordRequired" runat="server" ToolTip="La confirmation du mot de passe est requise."
                ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                ErrorMessage="Le mot de passe et le mot de passe de confirmation doivent correspondre."
                ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
        </p>
        <p class="submitButton">
            <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Créer"
                ValidationGroup="RegisterUserValidationGroup" OnClick="CreateUserButton_Click" />
        </p>
    </div>
</asp:Content>